<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEnrollsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('enrolls', function (Blueprint $table) {
            $table->increments('id');
            $table->uuid('activities_id'); //活动ID
            $table->string('name'); //姓名
            $table->string('mobile'); //电话
            $table->double('enrollPay'); //活动费用
            $table->string('content'); //活动活动内容 json数据

            //扩展字段,存储方式json，字段名称与活动表的规则对应
            $table->text('extfield');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('enrolls');
    }
}

